package com.share.finance.risk.third.init;

import com.share.finance.risk.third.service.IInterfaceConfigService;
import com.share.finance.risk.third.service.ILocalVariateConfService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.scheduling.annotation.Scheduled;
import org.springframework.stereotype.Component;

import javax.annotation.PostConstruct;

@Slf4j
@Component
public class LocalVariateConfInit {

    @Autowired
    private ILocalVariateConfService iLocalVariateConfService;

    @Autowired
    private IInterfaceConfigService interfaceConfigService;

    @PostConstruct
    @Scheduled(cron = "0 0/5 * * * ?")
    public void initHttp() {
        log.info("---正在初始化-iLocalVariateConfService---");
        iLocalVariateConfService.init();

        log.info("---正在初始化-interfaceConfigService---");
        interfaceConfigService.init();
    }
}
